
# class Solution:
#     def __init__(self, topn):
#         self.zeros = [None for _ in range(topn+1)]
#         self.twos = [None for _ in range(topn+1)]
#         self.fives = [None for _ in range(topn+1)]


#     def get_num_of_who(self, n, who: int, who_array):
#         ncopy = n
#         count = 0
#         while ncopy%who==0:
#             if who_array[ncopy] is None:
#                 count += 1
#             else:
#                 count += who_array[ncopy]
#                 break
#             ncopy //= who
#         who_array[n] = count
#         return count
    
#     def get_result(self, n):
#         ncopy = n
#         zero_num = self.get_num_of_who(n, 10, self.zeros)
#         ncopy //= 10**zero_num
#         two_num = self.get_num_of_who(ncopy, 2, self.twos)
#         ncopy //= 2**two_num
#         five_num = self.get_num_of_who(ncopy, 5, self.fives)
#         return (zero_num, two_num, five_num)
        

# if __name__ == '__main__':
#     n = int(input())
#     zeros=0
#     twos = 0
#     fives = 0
#     s = Solution(n)
#     for i in range(1, n+1):
#         zero, two, five = s.get_result(i)
#         zeros += zero
#         twos += two
#         fives += five
#         # print(i, zero, two, five)
#     print(zeros, twos, fives)
#     print(f"{zeros+min(twos, fives)}")


def count_trailing_zeros(n):
    count = 0
    while n >= 5:
        n //= 5
        count += n
    return count

n = int(input())
print(count_trailing_zeros(n))